<%@page import="com.sun.org.apache.xalan.internal.xsltc.compiler.sym"%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
	import="java.sql.*,java.util.*,com.zhida84.Convert.*,com.zhida84.Impl.*,com.zhida84.Dao.*"
	pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
<meta name="author" content="shangzhengbo&sunchangxing" />
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="viewport"
	content="width=device-width,height=device-height,inital-scale=1.0,maximum-scale=1.0,user-scalable=no;">
<title>美食推荐</title>
<script type="text/javascript">
	/**
	function onBridgeReady() {
		WeixinJSBridge.call('hideOptionMenu');
	}
	if (typeof WeixinJSBridge == "undefined") {
		if (document.addEventListener) {
			document.addEventListener('WeixinJSBridgeReady', onBridgeReady,
					false);
		} else if (document.attachEvent) {
			document.attachEvent('WeixinJSBridgeReady', onBridgeReady);
			document.attachEvent('onWeixinJSBridgeReady', onBridgeReady);
		}
	} else {
		onBridgeReady();
	}
	// 对浏览器的UserAgent进行正则匹配，不含有微信独有标识的则为其他浏览器
	var useragent = navigator.userAgent;
	if (useragent.match(/MicroMessenger/i) != 'MicroMessenger') {
		// 这里警告框会阻塞当前页面继续加载
		var opened = window.open('about:blank', '_self');
		opened.opener = null;
		opened.close();
		window.location.href = "../../error/wechat.html"
	}
	*/
</script>
<style>
* {
	margin: 0;
	padding: 0;
}

.myTeam {
	width: 100%;
	margin: 2px auto;
}

.myTeam tr th {
	text-align: center;
	background: rgb(23, 128, 231);
	height: 30px;
	line-height: 30px;
	color: #FFFFFF;
}

.myTeam tr td {
	text-align: center;
}

body {
	background: rgb(247, 248, 250);
}

body {
	font-family: "微软雅黑";
	font-size: 14px;
}

.myTeam {
	border: 1px solid rgb(23, 128, 231);
}

.SMSBOX {
	width: 100%;
	bottom: 0;
	height: 50px;
	position: fixed;
	background: rgb(23, 128, 231);
}

.SMSBOX {
	font-family: "微软雅黑";
	font-size: 14px;
	line-height: 50px;
}

.SMSBOX label {
	margin-left: 20px;
	color: #fff;
	float: left;
}

.SMSBOX a img {
	max-height: 50%;
	line-height: 50px;
	right: 30px;
	display: block;
	float: right;
	margin-top: 12px;
	margin-right: 20px;
}
</style>

</head>
<body>
	<jsp:include page="../../Share/top_back.jsp"></jsp:include>
	<script type="text/javascript">
		$("#alltitle").html("我的团队");
		function backhistory() {
			window.history.go(-1);
		}
	</script>
	<table class="myTeam">
		<tr>
			<th style="width: 14%;">姓名</th>
			<th>学校</th>
			<th style="width: 15%;">打电话</th>
			<th style="width: 14%">发短息</th>
		</tr>
		<%
			String strrecruitId = request.getParameter("/scx/123szb");
			int recruitId = Integer.parseInt(strrecruitId);
			String struserId = request.getParameter("uid");
			DESJM de = new DESJM();
			int myuserId = Integer.parseInt(de.decrypt(struserId));
			String commerPhhone = "";
			int Temnum=0;
			//转码
			StrConvert sc = new StrConvert();
			String trans = sc.chStrString(request.getParameter("trans"));
			if (trans.equals("待审核")) {
				out.println("您目前申请的兼职活动处于待审核状态!请耐心等待!");
			}
			if (trans.equals("被拒绝")) {
				out.print("抱歉由于申报队长人数过多，您被拒绝");
			}
			if (trans.equals("已完结")) {
				out.println("该活动已完结!无法查看组队信息");
			}
			if (trans.equals("已通过")) {
				//查询applyTable里含有招聘recruitId所有通过用户
				ApplyDao applyDao = new ApplyImpl();
				ResultSet apprs = applyDao.userRS(recruitId);
				while (apprs.next()) {
					int temid = apprs.getInt("userId");
					if (myuserId != temid) {
						//排除队长信息
						//通过usertable查所有信息
						UserDao userDao = new UserImpl();
						ResultSet rs = userDao.personal(temid);
						while (rs.next()) {
							String phone = Base64CodeO.decode(rs
									.getString("userPhone"));
							commerPhhone = commerPhhone + phone + ";";
							Temnum++;
		%>
		<tr>
			<td><%=rs.getString("userReName")%></td>
			<td><%=rs.getString("school")%></td>
			<td><a href="tel:<%=phone%>"><img style="max-height: 26%;"
					src="../../images/Signal/phone.png"></a></td>
			<td><a href="SMS:<%=commerPhhone%>"><img
					style="max-height: 26%;" src="../../images/Signal/SMS.png"></a></td>
		</tr>
		<%
			}
					}
				}
			}
		%>
	</table>
	<div class="SMSBOX">
		<label style="color: #ffffff !important">群发信息给小队成员(<%=Temnum %>)人:
		</label><a href="SMS:<%=commerPhhone%>"><img
			src="../../images/Signal/SMS.png" /></a>
	</div>
</body>
</html>